﻿
Partial Class Login1
    Inherits System.Web.UI.Page
    Dim us As String = ""
    Dim pw As String = ""

    Protected Sub btn_loguear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LoginButton.Click
        us = UserName.Text
        pw = Password.Text
        If Usuarios.Validar_Usuarios(us, pw) Then
            Me.Label1.Text = "Acceso Permitido :" + Now.ToLongTimeString
            Me.Label1.ForeColor = Drawing.Color.Green
            'Me.MsgModalPanel.Text = "Acceso Permitido :" + Now.ToLongTimeString
            'Me.MsgModalPanel.ForeColor = Drawing.Color.Black
            'Me.ImgRst.ImageUrl = "~/images/Ok.gif"
            'Me.ModalPopup.Show()
            'Almacenar Vigencia Seleccionada
            'Profile.Modulo = 
            FormsAuthentication.RedirectFromLoginPage(Me.UserName.Text, True)
        Else
            'Me.MsgModalPanel.Text = "Acceso Denegado : Usuario o Contreña Inválidas"
            'Me.MsgModalPanel.ForeColor = Drawing.Color.Black
            'Me.MsgModalPanel.Font.Bold = False
            'Me.ImgRst.ImageUrl = "~/images/Error.gif"
            'Me.ModalPopup.Show()
            Me.Label1.Text = "Acceso Denegado : Usuario o Contreña Inválidas"
            Me.Label1.ForeColor = Drawing.Color.Red
        End If
    End Sub
End Class
